package io.babystar.modules.business.controller;

import io.babystar.common.utils.PageUtils;
import io.babystar.common.utils.R;
import io.babystar.modules.business.entity.BaseMemberCardEntity;
import io.babystar.modules.business.entity.BaseVipEntity;
import io.babystar.modules.business.service.BaseMemberCardService;
import io.babystar.modules.business.service.BaseVipService;
import io.babystar.modules.sys.controller.AbstractController;
import io.babystar.modules.sys.entity.SysUserEntity;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;
import java.util.Map;


/**
 * 
 *
 * @author jeson
 * @email 574197743@qq.com
 * @date 2021-03-23 20:03:34
 */
@RestController
@RequestMapping("business/baseVip")
public class BaseVipController extends AbstractController {
    @Autowired
    private BaseVipService baseVipService;


    /**
     * 查询会员卡状态
     */
    @RequestMapping("/getBaseVip")
    public List<BaseVipEntity> getMemberCard(@RequestParam Map<String, String> params){
        SysUserEntity user = this.getUser();
        List<BaseVipEntity> list = baseVipService.getVipList(Integer.parseInt(user.getBusinessId()+""));
        return list;
    }

}
